<?php
use common\components\helpers\Fun;
use common\components\extenders\MenuManage;
?>
<div class="docs-main">
    <table id="tablesaw" class="tablesaw table yx-table1 yx-table5 table-striped with-check"  >
    <tr class="yx-bgd2f6ec">
        <td>学生姓名</td>
        <td>学生年龄</td>
        <td>家长姓名</td>
        <td>联系电话</td>
        <td>卡号</td>
        <td>操作</td>

    </tr>
    <?php foreach ($student_list as $i => $v) { ?>
        <tr>
            <td><?=isset($v->student->name)?\yii\helpers\Html::encode($v->student->name):''?></td>
            <td><?=isset($v->student)?\yii\helpers\Html::encode((int)date('Y')-$v->student->age):''?></td>
            <td><?=isset($v->student->customer)?\yii\helpers\Html::encode($v->student->customer->name):''?></td>
            <td><?=isset($v->student->customer)? \yii\helpers\Html::encode($v->student->customer->mobile):'' ?></td>
            <td><?=isset($v->student->customer)? \yii\helpers\Html::encode($v->student->customer->card_id):'' ?></td>
            <td><?=(new MenuManage(MenuManage::TOP_MENU))->detailsMenu('classmanage','studentturn',true,['class' => 'btn yx-radius2 yx-d-card yx-bg94d5a2','data'=>['id'=>$v->id]]);?></td>
        </tr>
    <?php } ?>
    </table>
</div>